|
![](/i/fill.gif) |
In article <3a965931$1@news.povray.org>, "Tom Melly"
<tom### [at] tomandlu co uk> wrote:
> Hmm, okay. How about this - if I render the following object:
>
> #declare X=0.99;//1.1
>
> intersection{
> sphere{0, 1 translate x*-X}
> sphere{0, 1 translate x*X}
> pigment{Red}
> }
>
> I will see at the end of render "CSG Intersection succeeded = 0 " (if
> X>=1) or a positive value (if X<1).
>
> Now, for collision detection, we are not interested in textures or
> resolution. Would it not be fairly easy (?!?) to write a patch that would
> render two objects as an intersection and return the CSG intersection
> succeeded value?
>
> The "render" would not have to produce any image output and all textures,
> media, photons, radiosity, etc. could be ignored to speed up the process.
I'm not sure what you mean...are you talking about the render
statistics, and a setting that makes it simulate rendering without
actually generating an image or computing textures? That statistic is
just the number of rays from the camera that hit an intersection, not
whether there was something left from the intersection or not. Using it
for collision detection wouldn't work very well, the results would
depend on whether the objects are visible, how far away they are, how
large they are, what resolution you are rendering at, etc...it would be
much more efficient to just code a function that scans the bounding box
of the object with rays and/or insideness tests.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |